package cn.zs.supply.common.core.domain.query;



import lombok.Data;
import org.apache.commons.beanutils.BeanUtils;

import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.util.Arrays;

@Data
public class Query implements Serializable {
    private static final String SWAGGER_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";

    private static final long serialVersionUID = -6455115414102115811L;
    protected String fields;//返回的字段集合，多个用逗号隔开
    protected String[] orderBy;//排序字段

    public String[] getOrder_by() {
        return orderBy;
    }

    public void setOrder_by(String[] order_by) {
        this.orderBy = order_by;
    }

    //*******************--兼容驼峰模式--********************//

    public String getFields() {
        return fields;
    }

    public void setFields(String fields) {
        this.fields = fields;
    }

    public String[] getOrderBy() {
        return orderBy;
    }

    public void setOrderBy(String[] orderBy) {
        this.orderBy = orderBy;
    }

    @Override
    public String toString() {
        return "Query{" +
                "fields='" + fields + '\'' +
                ", orderBy=" + Arrays.toString(orderBy) +
                '}';
    }
}


